﻿<%@ WebService Language="C#" Class="WSA.Manager_WS_Payments" %>
using System;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
using Dimok.Exceptions;
using Dimok.Web.UI;
using Data.LINQ;

namespace WSA {

	[WebService(Namespace = "http://motobankcorp.com/Profiler")]
	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
	[System.Web.Script.Services.ScriptService]
	public class Manager_WS_Payments : System.Web.Services.WebService {

		[WebMethod]
		public void ShowWaterFall(int ID) {
			var mb = new MotoBank();
			try {
				var wf = mb.ts_PaymentWaterFalls.Single(s => s.ID == ID).Attachment;
				Context.Response.ContentType = Dimok.Images.Enums.GetContentType(wf.ToArray());
				Context.Response.BinaryWrite(wf.ToArray());
				Context.Response.Flush();
				Context.Response.End();
			} catch (Exception exc) { ASPException.Publish(exc); throw exc; }
			//throw new Exception("UploadIDs:" + Jayrock.Json.Conversion.JsonConvert.ExportToString(UploadIDs)+",BatchID:"+PurchaseBatchID);
		}

	}
}

